<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>padding应用-新浪导航</title>
  <style>
    .nav {
      height: 41px;
      border-top: 3px solid #ff8500;
      border-bottom: 1px solid #edeef0;
      background-color: #fcfcfc;
      /* 文字样式可以继承，给父标签设置就可以了 */
      line-height: 41px;
    }
    .nav a {
      /* a标签是行内元素，设置宽度和高度无效，应转换为 行内块元素 */
      height: 41px;
      display: inline-block;
      text-decoration: none;
      /* text-align: center; */
      color: #4c4c4c;
      font-size: 14px;
      padding: 0 20px;
    }
    .nav a:hover {
      color: #ff8500;
      background-color: #eee;
    }
  </style>
</head>
<body>
  <div class="nav">
    <a href="#">设为首页</a>
    <a href="#">手机新浪网</a>
    <a href="#">登陆</a>
    <a href="#">关注我</a>
  </div>
</body>
</html>